<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
     <li>全部未完成的订单列表</li>
    
  </ol>

  <form class="form-inline search-box" role="form" ng-submit="search()" novalidate>
     <div class="form-group" style="display:table" >
      <label style="float:left;width:50px;">
        <input type="checkbox" name="ptype" value="02" ng-click="changeProductType();">信托
      </label>
      <label style="float:left;width:50px;">
        <input type="checkbox" name="ptype" value="03" ng-click="changeProductType();">资管
      </label>
      <label style="float:left;width:100px;">
        <input type="checkbox" name="ptype" value="07" ng-click="changeProductType();">债权基金
      </label>
      <label style="float:left;width:100px;">
        <input type="checkbox" name="ptype" value="06" ng-click="changeProductType();">股权基金
      </label>
     
    </div>
    <div class="form-group">
      <input class="form-control" placeholder="订单ID" name="id" ng-model="searchMap.id" style="width:130px;"></input> 
    </div>
    <div class="form-group">
      <input class="form-control" placeholder="订单编号" name="oCode" ng-model="searchMap.oCode" style="width:220px;"></input> 
    </div>
    <div class="form-group">
      <input class="form-control" placeholder="理财师手机号码" name="oULoginName" ng-model="searchMap.oULoginName" ></input> 
    </div>
    <div class="form-group">
      <input class="form-control" placeholder="产品名称" name="oPName" ng-model="searchMap.oPName" style="width:330px;"></input> 
    </div>
    <div class="form-group">
      <select  class="form-control" placeholder="产品负责人" ng-model="searchMap.oManagerName" ng-options="m.userNickname as m.userNickname for m in productCreatByList" >
        <option value="">--产品负责人--</option>
      </select>     
    </div>
    <div class="form-group">
      <select  class="form-control" placeholder="订单跟进人" ng-model="searchMap.oFlowerName" ng-options="u.username as u.username for u in orderManagerUserList" >
        <option value="">--订单跟进人--</option>
      </select> 
    </div>

    
    <div class="form-group">
      <label>预约日期</label>
      <input type="date" class="form-control" placeholder="开始日期,如2015-01-01" ng-model="searchMap.createDateStart" maxlength="10" title="预约开始日期">
    </div>至 
    <div class="form-group">
      <input type="date" class="form-control" placeholder="结束日期,如2015-01-01" ng-model="searchMap.createDateEnd" maxlength="10" title="预约结束日期">
    </div>
     <div class="form-group">
      <select class="form-control" placeholder="订单状态" ng-model="searchMap.oStatus" ng-options="m.value as m.text for m in dictMap.umcompleteCWOrderStatusModel" ><option value="">--选择订单状态--</option></select> 
    </div>   
<div class="form-group">
      <select class="form-control" placeholder="订单来源媒体" ng-model="searchMap.oMediaSource" ng-options="m.value as m.text for m in dictMap.mediaSourceModel" ><option value="">--选择订单来源媒体--</option></select> 
    </div> 

    <button type="submit" class="btn btn-default">查询</button>
    

    
  </form>
  <table class="table table-striped table-hover">
    <thead>
      <tr>
        <th width="30"><input type="checkbox" id="chkAllOrderList" ng-click="chkAllOrderList();" /></th>
        <th width="60">订单ID</th>
        <th width="60">订单号</th>
        <th width="80">产品简称</th>
        <th width="70">订单金额</th>
        <th width="80">客户姓名</th>
        <th width="50">FAID</th>
         <th width="80">订单跟进人</th>
        <th width="80">产品负责人</th>
        <th width="80">状态</th>
        <th width="60">预约时间</th>
        <th width="60">处理时间</th>
        <th width="40">來源</th>
        <th width="50">承销人</th>
        <th width="40">佣金</th>
        <th width="60">支付状态</th>
        <th width="110">操作</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="item in list">
        <td>
          <input type="checkbox" name="chkOrderList" value="{{item.id}}" faid="{{item.oFAId}}" omu="{{item.oFlowerName}}" />
        </td>
        <td><a ng-click="toViewPage(item.id,item.oPType,'neworder/caiwu/ordermanager/incomplete/view?s=2&')" href="javascript:">{{item.id}}</a></td>
        <td><a ng-click="toViewPage(item.id,item.oPType,'neworder/caiwu/ordermanager/incomplete/view?s=2&')" href="javascript:">{{item.oCode}}</a></td>
        <td  ng-if="item.oPType == '06'">
          <a href="https://www.superfa.cn/product/pevc/view/{{item.oProjectCode}}" target="_blank">{{item.oPName}}</a>
        </td>
        <td ng-if="item.oPType != '06'">
          <a href="http://www.superfa.cn/product/{{item.oProjectCode}}" target="_blank">{{item.oPName}}</a>
        </td>
        <td>{{item.oAmount | moneyRender2}}</td>
        <td>{{item.oCName}}</td>
        <td>{{item.oFAId}}</td>
        <td>{{item.oFlowerName}}</td>
        <td>{{item.oManagerName}}</td>
        <td class="order-status-{{item.oStatus}}">{{item.oStatus | orderStatusRender}}</td>
        <td>{{item.createDate | date:'yyyy-MM-dd HH:mm'}}</td>
        <td>{{item.updateDate | date:'yyyy-MM-dd HH:mm'}}</td>
        <td>{{item.oMediaSource|mediaSourceRender}}</td>
        <td>{{item.oOwnerId}}</td>
        <td>{{item.oYouDanRebate | moneyRender2}}</td>
        <td>{{item.oYouDanReceiverRebate | oYouDanReceiverRenter}}</td>
        <td class="optd">
          <!--<a href="#/neworder/caiwu/ordermanager/incomplete/view?id={{item.id}}&pType={{item.oPType}}&m=01&s=2" has-auth where="btn" who="PEVC_ORDER_EDIT">编辑</a>-->
          <a ng-click="toViewPage(item.id,item.oPType,'neworder/caiwu/ordermanager/incomplete/view?s=2&')" href="javascript:">编辑</a>
        </td>
      </tr>
    <tbody>
  </table>

	<div class="pager-box" ng-include src="'tpl/public/pager.html'" ng-show="list.length > 0"></div>
</div>

<div class="layer-box" ng-show="isShowOrderManagerLayer">
  <div class="layer-bg"></div>
  <div class="layer-con " style="padding:10px 20px;">
    <span class="icons-close" title="关闭" ng-click="isShowOrderManagerLayer = false;">X</span>
    <div class="layer-title">
      <label ng-if="t == '1'">分配！请确认操作！</label>
      <label ng-if="t == '0'">回收！请确认操作！</label>
    </div>
    <div class="con-wrap">
      <div class="form-group" >
        <table class="order-f-h" style="width:100%">
          <tr ng-if="t == '1'">
            <td colspan="2">
              <select class="form-control" ng-model="managerOrder.systemUserId" ng-options="u.userId as u.username for u in orderManagerUserList2">
              </select>
            </td>
          </tr>
          <tr>
            <td colspan="2" style="text-align:left;font-weight: bold;">共选择{{chooseOrderIdCount}}条订单！</td>
          </tr>
          <tr>
            <td><a class="btn btn-block btn-primary" ng-click="fenpeiOrHuishou(t);">确定</a></td>
            <td><a class="btn btn-block btn-primary" ng-click="isShowOrderManagerLayer = false;">取消</a></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</div> 


<div class="layer-box" ng-show="isShowOrder"  >
  <div class="layer-bg"></div>

  <div class="layer-con " style="padding:10px 20px; width:440px;height:335px;">
    <span class="icons-close" title="关闭" ng-click="isShowOrder = false;">X</span>
    <div class="layer-title">
      <label >订单情况</label>
    </div>
    <div style="padding:10px 20px; width:400px;height:300px;overflow: scroll">
    
    <div class="con-wrap">
      <div class="form-group" >

<div ng-if="orderList==''">
<table class="order-f-h ziliaoshangchuan" style="width:100%">
          <tr >
            <td >
              序号
            </td>
            <td >
              订单号
            </td>
            <td >
              当前状态
            </td>
            <td >
              停留天数
            </td>
          </tr>

          
        </table>


  无订单记录
</div>
<div ng-if="orderList.length>0">
        <table class="order-f-h ziliaoshangchuan" style="width:100%">
          <tr >
            <td >
              序号
            </td>
            <td >
              订单号
            </td>
            <td >
              当前状态
            </td>
            <td >
              停留天数
            </td>
          </tr>
          <tr ng-repeat="order in orderList">
            <td >
            {{$index+1}}
            </td>
            <td >
              {{order.o_code}}
            </td>
            <td >
              {{order.o_status}}
            </td>
            <td >
              {{order.dateDiffnow}}
            </td>
            
          </tr>
          
        </table>
        <div >
      </div>
    </div>
    </div>
  </div>
</div> 
